﻿using Mota.XMLControls;
using System;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Data;
using System.Xml;
using System.Xml.Linq;
using System.Linq;

namespace Mota.EditModule
{
    public class EditFormIsValidVisitor:GuiVisitor
    {
        public bool IsMeetRequirements = true;
        //TODO: add dispose method
        public EditFormIsValidVisitor()
        {
        }
       
        public override void Visit(GuiComboBox guiCombobox)
        {
            if (!guiCombobox.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiTextBox guiTextBox)
        {
            if (!guiTextBox.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiRichText guiRichText)
        {
            if (!guiRichText.IsValid)
                IsMeetRequirements = false;
        }
        
        public override void Visit(GuiDateTime guiDateTime)
        {
            if (!guiDateTime.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiImageBox guiImageBox)
        {
            if (!guiImageBox.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiCheckBox guiCheckBox)
        {
            if (!guiCheckBox.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiMaskText guiMaskText)
        {
            if (!guiMaskText.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiNumeric guiNumeric)
        {
            if (!guiNumeric.IsValid)
                IsMeetRequirements = false;
        }
        
        public override void Visit(GuiGroupBox guiGroupBox)
        {
        }

        public override void Visit(GuiLabel guiLabel)
        {
        }

        public override void Visit(GuiSplitter guiSplitter)
        {
        }

        public override void Visit(GuiSplitterPanel guiSplitterPanel)
        {
        }

        public override void Visit(GuiTab guiTab)
        {
        }

        public override void Visit(GuiTabControl guiTabControl)
        {
        }

        public override void Visit(GuiWebBrowser guiWebBrowser)
        {
        }

        public override void Visit(GuiCheckedList guiCheckedList)
        {
            if (!guiCheckedList.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiTreeView guiTreeView)
        {
            if (!guiTreeView.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiTime guiTime)
        {
            if (!guiTime.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiColor guiColor)
        {
            if (!guiColor.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiTrackBar guiTrackBar)
        {
            if (!guiTrackBar.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiPanel guiPanel)
        {
        }

        public override void Visit(GuiCheckedComboBox guiCheckedComboBox)
        {
            if (!guiCheckedComboBox.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiListBox guiListBox)
        {
            if (!guiListBox.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiRadioGroup guiRadioGroup)
        {
            if (!guiRadioGroup.IsValid)
                IsMeetRequirements = false;
        }

        public override void Visit(GuiRangeTrackBar guiRangeTrackBar)
        {
            if (!guiRangeTrackBar.IsValid)
                IsMeetRequirements = false;
        }
    }
}
